function LCS( str1 ,  str2 ) {
    // write code here
     if (str1.length > str2.length) {
    [str1, str2] = [str2, str1]
  }
     let result = "";
  const len = str1.length;
  for(let j = len; j > 0; j --) {
    for (let i = 0; i <= len - j; i++) {
      if(str1[])
      result = str1.substr(i, j);
      console.log(result)
      console.log(str2.includes(result))
      if (str2.includes(result)) {
        return result
      } else {
        return -1
      } 
    }
  }
}
console.log(LCS("22123sss","123sss111"))